<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class CouponStoreRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'bail|required|string',
            'color' => 'bail|nullable|string',
            'unlock_price' => 'bail|nullable|numeric',
            'free_price' => 'bail|required|numeric',
            'num_of_user' => 'bail|nullable|int',
            'is_auto' => 'bail|nullable|int|in:0,1',
            'is_active' => 'bail|required|int|in:0,1',
            'start_use_at' => 'bail|required|string',
            'end_use_at' => 'bail|required|string',
            'stop_get' => 'bail|nullable|string',
        ];
    }
}
